#define Filter_Variable

#include "userDef.h"

void FanRunTime(void) // called per 1s/200ms(quick test)
{
    static U8 FanRunSec = 0;
    static U8 FanRunMin = 0;

    if (e_fanStep.run != FANSTOP)
    {
        FanRunSec++;

        if (FanRunSec >= Norm60Fast02)
        {
            FanRunSec = 0;
            FanRunMin++;

            if (FanRunMin >= Norm60Fast02)
            {
                FanRunMin = 0;
                FilterCleanHour++;

                if (f_quickTest == OFF)
                {
                    f_eepRomW = 1;
                }

                // quick test:1s=200ms, 60s=200ms*2=400ms,1hour=400ms*2=800ms,800ms*600=480s
                if (FilterCleanHour >= 600)
                {
                    f_FilterClean = TRUE;
                    FilterCleanHour = 0;

                    if (f_quickTest == OFF)
                    {
                        f_eepRomW = 1;
                    }
                }
            }
        }
    }
}
